{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# Downloading Files from Internet\n",
    "\n",
    "is done by the `download()` command"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "if !isdir(\"Results\")\n",
    "    error(\"create the subfolder Results before running this program\")\n",
    "end"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Some Data from Kenneth French's Homepage"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "File to download: http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/F-F_Research_Data_Factors_daily_CSV.zip\n",
      "\n",
      "check the subfolder Results\n",
      "\n"
     ]
    }
   ],
   "source": [
    "http   = string(\"http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/\",\n",
    "                \"F-F_Research_Data_Factors_daily_CSV.zip\")\n",
    "\n",
    "println(\"File to download: \",http)\n",
    "download(http,\"Results/WhatIJustDownloaded.zip\")\n",
    "\n",
    "println(\"\\ncheck the subfolder Results\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "@webio": {
   "lastCommId": null,
   "lastKernelId": null
  },
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Julia 1.3.0",
   "language": "julia",
   "name": "julia-1.3"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.3.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
